package com.zhdl.modules.demo.DCHTProcess;

//import com.zhdl.modules.common.entity.ConfigurationPLc;
//import com.zhdl.modules.common.test.GetPLCValue;
import com.zhdl.hardware_contact.hardware_config.entity.ProjectConfiguration;
import com.zhdl.modules.process.common.GetPLCValue;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
@Component
public class CHTRobotInterface implements GetPLCValue {
    public  final String PICK_DONE = "pick_done";
    List<ProjectConfiguration> configurationPLcList;
    public void initData(){
        configurationPLcList = new ArrayList<>();
        configurationPLcList.add(new ProjectConfiguration("pick_done","0",1));
    }
    @Override
    public ProjectConfiguration getValue(String field) {
        for (ProjectConfiguration configurationPLc : configurationPLcList) {
            if (configurationPLc.getValue().equals(field)){
                return configurationPLc;
            }
        }
        return null;
    }


}
